<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        #box {
            width: 300px;
            height: 300px;
            margin: 0 auto;
            text-align: center;
            border: 5px solid black;
            border-radius: 20px;
            position: relative;
            background: #e0e0e0;
        }
        
        #gb {
            position: absolute;
            top: 10px;
            right: 10px;
            border: none;
            outline: none;
            border: 1px solid black;
            border-radius: 3px;
            background: #c3c3c3;
        }
        
        #gb:active {
            background: black;
            color: white;
        }
        
        #center {
            width: 200px;
            height: 20px;
            text-align: center;
            margin: 0 auto;
            position: absolute;
            top: 100px;
            left: 50px;
            border: none;
            outline: none;
            background: #e0e0e0;
        }
        
        #huai {
            width: 40px;
            text-align: center;
            position: absolute;
            bottom: 50px;
            right: 50px;
            border: none;
            outline: none;
            border: 1px solid black;
            border-radius: 3px;
            background: #c3c3c3;
        }
        
        #huai:active {
            background: black;
            color: white;
        }
        
        #hao:active {
            background: black;
            color: white;
        }
        
        #hao {
            width: 40px;
            text-align: center;
            position: absolute;
            bottom: 50px;
            left: 50px;
            border: none;
            outline: none;
            border: 1px solid black;
            border-radius: 3px;
            background: #c3c3c3;
        }

    </style>
</head>

<body>
    <div id="box">
        <input type="text" id="center" value="你喜欢我嘛？">
        <button id="gb" onclick="center.value='关闭也改变不了你喜欢我这个事实！'">x</button>
        <input type="text" id="hao" value="NO" onmouseover="hao.value = 'YES';huai.value = 'NO';">
        <input type="text" id="huai" value="YES" onmouseover="huai.value = 'YES';hao.value = 'NO';">
    </div>
    <script>
        var center=document.getElementById("center");
        var hao = document.getElementById("hao");
        var huai = document.getElementById("huai");

        hao.onclick = function() {
            if (hao.value == "YES") {
                alert("那我们在一起吧？")
            }
        }

        huai.onclick = function() {
            if (huai.value == "YES") {
                alert("那我们在一起吧？")
            }
        }

    </script>
</body>

</html>
